//
//  Utility.h
//  ZTML
//
//  Created by hdz on 17/11/6.
//  Copyright (c) 2017年 long. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>


@interface Utility : NSObject

+ (UIViewController *)currentViewController;
+ (void)showAlertMessage:(NSString *)atMessage;
+ (void)showAlertTitle:(NSString *)atTitle Message:(NSString *)atMessage;
+ (BOOL)networkDetection;
+ (UIWindow *)mainWindow;
+ (BOOL)isNumber:(NSString *)mobileNum;
+ (BOOL)isMobileNumber:(NSString *)mobileNum;
+ (BOOL)isBlankString:(NSString *)string;
+ (void)startTime:(UIButton *)sender;
+ (NSString *)currentTime:(NSDate *)date;
+ (CGSize)getTextString:(NSString *)text textFont:(UIFont *)font frameWidth:(float)width attributedString:(NSMutableAttributedString *)attributedString;
+ (NSString *)exchageTimeInterval:(NSInteger)timeInterval format:(NSString *)format;
+ (NSString *)exchageDate:(NSDate *)date format:(NSString *)format;
+ (UIImage *)compressImage:(UIImage *)sourceImage toTargetWidth:(CGFloat)targetWidth;
+ (BOOL)stringContainsEmoji:(NSString *)string;
+ (UIImage *)imageWithScreenshot;
+ (UIView *)initLineRect:(CGRect)rect lineColor:(UIColor *)lineColor;
+ (CAShapeLayer *)setLayerWithRect:(CGRect)rect radii:(CGSize)size;
+ (void)fuwenbenLabel:(UILabel *)label fontNumber:(id)font andRange:(NSRange)range andColor:(UIColor *)vaColor;
+ (NSString *)showTime:(NSTimeInterval)msglastTime showDetail:(BOOL)showDetail;
+ (BOOL)judgeIdentityStringValid:(NSString *)identityString;
+ (BOOL)isValidateEmail:(NSString *)email;
+ (UIView *)currentNavigationView;
+ (void)downloadImageWithURLString:(NSString *)urlString success:(void (^)(UIImage *image))success;
+ (void)downloadImageWithURLStrings:(NSArray *)urlStrings success:(void (^)(NSMutableArray<UIImage *> *images))success;
+ (UIImage *)boxblurImage:(UIImage *)image withBlurNumber:(CGFloat)blur;
+ (BOOL)isHeadsetPluggedIn;
+ (BOOL)checkSpecialCharacter:(NSString *)string;
+ (NSData *)compressOriginalImage:(UIImage *)image toMaxDataSizeKBytes:(NSUInteger)size;
+ (void)showMessage:(NSString *)message type:(int)type;
+ (NSString *)getCurrentTimesDay:(NSInteger)day isNext:(BOOL)isnextMoth;
+ (NSInteger)getDifferenceOneTime:(NSString *)oneTime nextTime:(NSString *)nextTime;
+ (BOOL)regularPhone:(NSString *)string;


+ (void)startTime:(UIButton *)sender withArrTitles:(NSArray *)titles;
///////获取日期数据
- (NSArray *)getDateArr;
//获取本地银行卡ID
+ (NSString *)locDatawithKey:(NSString *)name;

//获取时间段
+(NSString *)getTheTimeBucket;
+ (NSDate *)getCustomDateWithHour:(NSInteger)hour;
@end
